import {Get, GetAndHeaders, url, PostAndHeaders} from "./api";

const myLale="/tale";
const urlList = {
  caihongpi: url + myLale+"/getCaiHongPi",
  listStatu: url +myLale+ "/statu/listStatu",
  saveTaleAndDetails: url +myLale+ "/saveTaleAndDetails",
  listByToken: url +myLale+ "/listByToken",
  updateTaleAndDetails: url +myLale+ "/updateTaleAndDetails",
  deleteTale:url+myLale+"/deleteTale",
  signTaleDitu:url+myLale+"/signTaleDitu",
  listCityName:url+myLale+"/listCityName"
};


export function signTaleDitu(data,headers) {
  return PostAndHeaders(urlList.signTaleDitu,data,headers)
}


export function listCityName(headers) {
  return GetAndHeaders(urlList.listCityName, {},headers)
}
export function getCaihongPi() {
  return Get(urlList.caihongpi, {})
}

export function listStatu() {
  return Get(urlList.listStatu, {})
}

export function saveTaleAndDetails(data, headers) {
  return PostAndHeaders(urlList.saveTaleAndDetails, data, headers)
}

export function listByToken(params, headers) {
  return GetAndHeaders(urlList.listByToken, params, headers)
}

export function updateTaleAndDetails(data, headers) {
  return PostAndHeaders(urlList.updateTaleAndDetails, data, headers)
}

export function deleteTale(params,headers) {
  return GetAndHeaders(urlList.deleteTale,params,headers)
}

